<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			// 什么对象
			function Person(){
				 this.name = "小张";
				 this.age = 18;
			}
		
			var p = new Person();
		 //    alert(p);
			// alert(p.name);
			p.name = "小李";
			// alert(p.name);
		
			// 第二种定义方式
			function Person1(name, age){
				this.name = name;
				this.age = age;
			}
			var p1 = new Person1("小王", 19)
			// 增加属性
			p1.sex = "男";
		    alert(p1.sex);
		
			// 直接量方式
			var p3 = {name:"赵大", age:19};
			alert(p3.name);
		
		
		</script>
	</head>
	<body>
	</body>
</html>
